Skip to content

opDetDigitizerSBND: pass the waveforms to sliceWaveforms by reference - #989

Open
jzennamo wants to merge 1 commit into
developfrom
feature/jaz_opdet_slice_waveforms_by_reference
Open

jzennamo wants to merge 1 commit into
developfrom
feature/jaz_opdet_slice_waveforms_by_reference

Conversation

@jzennamo

Copy link
Copy Markdown
Contributor

opDetDigitizerSBND::sliceWaveforms took the full-readout waveform vector and the PMT channel list by value, copying every PMT waveform (432 MB per event in a BNB + cosmics job). Both are only read, so they are now const references.

Measured effect: Removes a 432 MB transient copy per event. The detsim job's peak memory did not change, because the peak is set inside WireCell.

Validation: No change in output (the function body is unchanged).

Context: one item of a menu of time, memory, and disk savings for the Gen3 MC production. Each change is its own PR with one commit on develop, so they can be taken (or not) independently. Profiling and validation are in the slides "Gen3 MC Production: Where the Time and Disk Go" (Nov 2026). The validation is a fixed-seed comparison of the full gen-to-CAF chain against v10_26_00 (124 events, release run twice to measure its own run-to-run variation), plus each change applied alone on the release's own inputs and compared in the flat CAF (2895 branches).

🤖 Generated with Claude Code

sliceWaveforms took the full-readout std::vector<raw::OpDetWaveform> (and
the PMT channel list) by value, so every event copied all waveforms before
slicing them: 432 MB in a BNB + cosmics detsim job, on top of the
originals. Both arguments are only read; they are now const
references. No change in output; the detsim peak memory is set inside
WireCell, so it does not move.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant